import { cloud, default as request } from "@/framework/utils/request";


/**
 * @description: 查询banner列表 /banner/getAll
 * @param data
 */
export function QueryBannerList(data) {
  return request({
    url: `${cloud.mall}/banner/getAll`,
    method: "get",
    params: data,
  });
}

/**
 * @description: 添加Banner /banner/insert
 * @data
 */
export function AddBanner(data) {
  return request({
    url: `${cloud.mall}/banner/insert`,
    method: "post",
    data,
  });
}

/**
 * @description: 批量更新banner /banner/batchtUpdate
 * @data
 */
export function batchtUpdate(data) {
  return request({
    url: `${cloud.mall}/banner/batchtUpdate`,
    method: "post",
    data,
  });
}

/**
 * @description: 更新banner /banner/update
 * @data
 */
export function editBanner(data) {
  return request({
    url: `${cloud.mall}/banner/update`,
    method: "post",
    data,
  });
}


/**
 * @description: 插入首页设置 /homeSetting/insert
 * @data
 */
export function InsertHomepage(data) {
  return request({
    url: `${cloud.mall}/homeSetting/insert`,
    method: "post",
    data,
  });
}

/**
 * @description: 根据id更新首页设置 /homeSetting/update
 * @data
 */
export function UpdateHomepage(data) {
  return request({
    url: `${cloud.mall}/homeSetting/update`,
    method: "post",
    data,
  });
}

/**
 * @description: 查询首页设置列表 /homeSetting/getAll
 * @param data
 */
export function QueryHomepage(data) {
  return request({
    url: `${cloud.mall}/homeSetting/getAll`,
    method: "get",
    params: data,
  });
}


/**
 * @description: 批量更新首页设置 /homeSetting/batchtUpdate
 * @data
 */
export function BatchUpdateHomepage(data) {
  return request({
    url: `${cloud.mall}/homeSetting/batchtUpdate`,
    method: "post",
    data,
  });
}


/**
 * @description: 查询商品一级分类数据 /tMgdCategory/listFistCate
 * @param data
 */
export function QueryClassification(data) {
  return request({
    url: `${cloud.mall}/tMgdCategory/listFistCate`,
    method: "get",
    params: data,
  });
}


/**
 * @description: 提交审核 /goods/updatePtStatus
 * @param data
 */
export function SubmitForReview(data) {
  return request({
    url: `${cloud.mall}/goods/updatePtStatus`,
    method: "get",
    params: data,
  });
}


/**
 * @description: 所有店铺查询 /tMallInfo/getAllMall
 * @param data
 */
export function QueryMallNameList(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/getAllMall`,
    method: "get",
    params: data,
  });
}



/**
 * @description: 分页查询企业信息所有数据 /tMallInfo/page
 * @param data
 */
export function QueryStoreList(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/page`,
    method: "get",
    params: data,
  });
}

/**
 * @description: 查看店铺详情 /tMallInfo/getMallInfoByMallCode
 * @param data
 */
export function QueryStoreInfo(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/getMallInfoByMallCode`,
    method: "get",
    params: data,
  });
}


/**
 * @description: 店铺审核 /tMallInfo/approval
 * @data
 */
export function StoreReviewHandel(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/approval`,
    method: "post",
    data,
  });
}